﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ObviousCode.UI.Aspect.PluginLibrary.Interfaces;
using ObviousCode.Aspect.PluginLibrary.Interfaces;
using ObviousCode.Aspect.PluginLibrary.Caches;

namespace ObviousCode.UI.Aspect.Persistence.AspectDesigner.Savers
{
    public class DesignerSaver_V1 : DesignerSaver
    {
        protected override void PerformSave(IAspectDesigner designer)
        {
            Dictionary.Set("cache", designer.GetPersistable<AspectCache>().Persist());

            Dictionary.Set("surface", designer.GetPersistable<IAspectSurface>().Persist());

            Dictionary.Set("tree", designer.GetPersistable<IAspectMenu>().Persist());
        }

        public override int Version
        {
            get { return 1; }
        }
    }
}
